<!-- 采购管理-供应商管理-供应商基础设置 -->
<template>
  <div class="base-setting">
    <pageHeader
      :title="title"
      :breadCrumb="breadCrumb"
      :isShowBtn="false"
    ></pageHeader>
    <div class="base-setting-warp">
      <div v-for="(item, index) in setting" :key="index">
        <settingWrap
          @goDetail="goDetail(item)"
          :name="item.name"
          :description="item.description"
          :icon="item.icon"
        ></settingWrap>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { reactive, ref } from 'vue';
  import { useRouter } from 'vue-router';

  const router = useRouter();
  const title: string = '基础设置';

  const breadCrumb: string[] = ['采购管理', '供应商管理', '供应商基础设置'];

  const setting = reactive([
    {
      name: '供应商编号设置',
      description: '-主要用于配置供应商编号',
      icon: 'icon-settings',
      path: 'NumberSupplier',
    },
    {
      name: '供应商级别设置',
      description: '-主要用于配置供应商级别',
      icon: 'icon-settings',
      path: 'LevelSupplier',
    },
    {
      name: '供应商类别设置',
      description: '-主要配置供应商类别',
      icon: 'icon-settings',
      path: 'CategorySupplier',
    },
    {
      name: '供应商评级设置',
      description: '-主要配置供应商评级',
      icon: 'icon-settings',
      path: 'RateSupplier',
    },
    // {
    //   name: '供应商信息模板',
    //   description: '-主要配置供应商信息录入模版',
    //   icon: 'icon-settings',
    //   path: 'TemplateSupplier',
    // },
    // {
    //   name: '供应商注册通知',
    //   description: '-主要用于配置供应商注册成功通知',
    //   icon: 'icon-settings',
    //   path: 'RegisteredSupplier',
    // },
    // {
    //   name: '供应商登录设置',
    //   description: '-主要用于配置供应商登录账户与初始密码',
    //   icon: 'icon-settings',
    //   path: 'LoginSupplier',
    // },
    // {
    //   name: '供应商状态设置',
    //   description: '-主要用于配置供应商状态',
    //   icon: 'icon-settings',
    //   path: 'StateSupplier',
    // },
    {
      name: '供应商认证项目设置',
      description: '-主要用于配置供应商认证项目',
      icon: 'icon-settings',
      path: 'SupplierCertificationSetup',
    },
  ]);

  const goDetail = (item: any) => {
    router.push({
      name: item.path,
    });
  };
</script>

<style scoped lang="less">
  .base-setting {
    &-warp {
      display: flex;
      flex: 1;
      flex-wrap: wrap;
    }
  }
</style>
